package com.ruoyi.income.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 订单返佣收入信息对象 wdmd_distribution_income
 * 
 * @author ruoyi
 * @date 2025-10-11
 */
public class DistributionIncome extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 佣金ID */
    private Long incomeId;

    /** 订单ID */
    @Excel(name = "订单ID")
    private Long orderId;

    /** 订单编号 */
    @Excel(name = "订单编号")
    private String orderCode;

    /** 商品ID */
    @Excel(name = "商品ID")
    private Long goodsId;

    /** 分销员ID */
    @Excel(name = "分销员ID")
    private Long distributorId;

    /** 返佣规则ID */
    @Excel(name = "返佣规则ID")
    private Long ruleId;

    /** 订单实付金额 */
    @Excel(name = "订单实付金额")
    private BigDecimal orderAmount;

    /** 佣金计算基数 */
    @Excel(name = "佣金计算基数")
    private BigDecimal commissionBase;

    /** 实际返佣金额 */
    @Excel(name = "实际返佣金额")
    private BigDecimal rebateAmount;

    /** 税费 */
    @Excel(name = "税费")
    private BigDecimal taxAmount;

    /** 实际到账金额 */
    @Excel(name = "实际到账金额")
    private BigDecimal actualAmount;

    /** 关系层级：1-一级 2-二级 */
    @Excel(name = "关系层级：1-一级 2-二级")
    private String relationLevel;

    /** 状态：0-待计算 1-已计算 2-已发放 3-已取消 4-已扣回 */
    @Excel(name = "状态：0-待计算 1-已计算 2-已发放 3-已取消 4-已扣回")
    private String incomeStatus;

    /** 计算时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "计算时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date calculateTime;

    /** 发放时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "发放时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date issueTime;

    /** 状态（0=上架 1=下架） */
    @Excel(name = "状态", readConverterExp = "0==上架,1==下架")
    private String status;

    /** 删除标志（0存在 2删除） */
    private String delFlag;

    /** 版本号（乐观锁） */
    @Excel(name = "版本号", readConverterExp = "乐=观锁")
    private Long version;

    public void setIncomeId(Long incomeId) 
    {
        this.incomeId = incomeId;
    }

    public Long getIncomeId() 
    {
        return incomeId;
    }

    public void setOrderId(Long orderId) 
    {
        this.orderId = orderId;
    }

    public Long getOrderId() 
    {
        return orderId;
    }

    public void setOrderCode(String orderCode) 
    {
        this.orderCode = orderCode;
    }

    public String getOrderCode() 
    {
        return orderCode;
    }

    public void setGoodsId(Long goodsId) 
    {
        this.goodsId = goodsId;
    }

    public Long getGoodsId() 
    {
        return goodsId;
    }

    public void setDistributorId(Long distributorId) 
    {
        this.distributorId = distributorId;
    }

    public Long getDistributorId() 
    {
        return distributorId;
    }

    public void setRuleId(Long ruleId) 
    {
        this.ruleId = ruleId;
    }

    public Long getRuleId() 
    {
        return ruleId;
    }

    public void setOrderAmount(BigDecimal orderAmount) 
    {
        this.orderAmount = orderAmount;
    }

    public BigDecimal getOrderAmount() 
    {
        return orderAmount;
    }

    public void setCommissionBase(BigDecimal commissionBase) 
    {
        this.commissionBase = commissionBase;
    }

    public BigDecimal getCommissionBase() 
    {
        return commissionBase;
    }

    public void setRebateAmount(BigDecimal rebateAmount) 
    {
        this.rebateAmount = rebateAmount;
    }

    public BigDecimal getRebateAmount() 
    {
        return rebateAmount;
    }

    public void setTaxAmount(BigDecimal taxAmount) 
    {
        this.taxAmount = taxAmount;
    }

    public BigDecimal getTaxAmount() 
    {
        return taxAmount;
    }

    public void setActualAmount(BigDecimal actualAmount) 
    {
        this.actualAmount = actualAmount;
    }

    public BigDecimal getActualAmount() 
    {
        return actualAmount;
    }

    public void setRelationLevel(String relationLevel) 
    {
        this.relationLevel = relationLevel;
    }

    public String getRelationLevel() 
    {
        return relationLevel;
    }

    public void setIncomeStatus(String incomeStatus) 
    {
        this.incomeStatus = incomeStatus;
    }

    public String getIncomeStatus() 
    {
        return incomeStatus;
    }

    public void setCalculateTime(Date calculateTime) 
    {
        this.calculateTime = calculateTime;
    }

    public Date getCalculateTime() 
    {
        return calculateTime;
    }

    public void setIssueTime(Date issueTime) 
    {
        this.issueTime = issueTime;
    }

    public Date getIssueTime() 
    {
        return issueTime;
    }

    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }

    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    public void setVersion(Long version) 
    {
        this.version = version;
    }

    public Long getVersion() 
    {
        return version;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("incomeId", getIncomeId())
            .append("orderId", getOrderId())
            .append("orderCode", getOrderCode())
            .append("goodsId", getGoodsId())
            .append("distributorId", getDistributorId())
            .append("ruleId", getRuleId())
            .append("orderAmount", getOrderAmount())
            .append("commissionBase", getCommissionBase())
            .append("rebateAmount", getRebateAmount())
            .append("taxAmount", getTaxAmount())
            .append("actualAmount", getActualAmount())
            .append("relationLevel", getRelationLevel())
            .append("incomeStatus", getIncomeStatus())
            .append("calculateTime", getCalculateTime())
            .append("issueTime", getIssueTime())
            .append("status", getStatus())
            .append("delFlag", getDelFlag())
            .append("version", getVersion())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("createBy", getCreateBy())
            .append("updateBy", getUpdateBy())
            .append("remark", getRemark())
            .toString();
    }
}
